#ifndef COUNCILMEMBER_H
#define COUNCILMEMBER_H

#include <string>
#include <iostream>
#include "CsvRow.h"

class CouncilMember
{
public:
  CouncilMember(const std::string& id, const std::string& name, const std::string& address,
    const std::string& phone):
  m_id(id),
  m_name(name),
  m_address(address),
  m_phone(phone)
  {
  }

  CouncilMember()
  {
  }

  bool empty() const
  {
    return m_id.empty() &&
      m_name.empty() &&
      m_address.empty() &&
      m_phone.empty();
  }

  virtual ~CouncilMember() {}

  const std::string& id() const { return m_id; }
  const std::string& name() const { return m_name; }
  const std::string& address() const { return m_address; }
  const std::string& phone() const { return m_phone; }

  void setId(const std::string& value) { m_id = value; }
  void setName(const std::string& value) { m_name = value; }
  void setAddress(const std::string& value) { m_address = value; }
  void setPhone(const std::string& value) { m_phone = value; }

  CouncilMember& operator=(const CouncilMember& other);
  bool operator==(const CouncilMember& other) const;
  bool operator<(const CouncilMember& other) const;
private:
  std::string m_id;
  std::string m_name;
  std::string m_address;
  std::string m_phone;
};

std::ostream& operator<<(std::ostream& stream, const CouncilMember &member);
std::istream& operator>>(std::istream& stream, CouncilMember& member);

#endif // COUNCILMEMBER_H